<template>
  <Maptalks :mapOnLoadCB="mapOnLoadCB"></Maptalks>
</template>

<script>
import Maptalks from "@/components/common/Maptalks.component.vue"
import MapLayerConst from "@/const/MapLayerConst"

export default {
  name: "AddCircleMarker.component",
  components: {Maptalks},
  setup() {

    let mapOnLoadCB = (map) => {

      let circle = new maptalks.Circle([121.505, 31.2611], 250, {
        symbol: {
          lineColor: "#333",
          lineWidth: 2,
          polygonFill: "rgb(18,121,222)",
          polygonOpacity: 0.8
        }
      });
      map.setZoom(14)
      new maptalks.VectorLayer(MapLayerConst.MAP_MARKER_LAYER).addGeometry(circle).addTo(map);

    };

    return {
      mapOnLoadCB
    }
  }
}
</script>

<style scoped>

</style>